From: Varun Wadekar Date: Wed, 8 Nov 2017 22:03:16 +0000 (-0800) Subject: Tegra: smmu: change exit criteria for context size calculation X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=2ad1bddca9272d622696d882c9439aaa06e359ff;p=project%2Fbcm63xx%2Fatf.git Tegra: smmu: change exit criteria for context size calculation Tegra SoCs currently do not have a SMMU register at address 0xFFFFFFFF. This patch changes the search criteria, to look for this marker, to calculate the size of the saved context. Change-Id: I15d91945ecb78267f91c45f37985dbb2327ca3ae Signed-off-by: Varun Wadekar --- diff --git a/plat/nvidia/tegra/common/drivers/smmu/smmu.c b/plat/nvidia/tegra/common/drivers/smmu/smmu.c index 333d7d16..8c1b899f 100644 --- a/plat/nvidia/tegra/common/drivers/smmu/smmu.c +++ b/plat/nvidia/tegra/common/drivers/smmu/smmu.c @@ -101,12 +101,13 @@ void tegra_smmu_save_context(uint64_t smmu_ctx_addr) * the last entry. Sanity check the table size before we start with * the context save operation. */ - while (smmu_ctx_regs[num_entries].val != 0xFFFFFFFFU) { + while ((smmu_ctx_regs[num_entries].reg != 0xFFFFFFFFU)) { num_entries++; } /* panic if the sizes do not match */ if (num_entries != smmu_ctx_regs[0].val) { + ERROR("SMMU context size mismatch!"); panic(); }